package com.woniu.controller;


import com.woniu.domain.Userfeedback;
import com.woniu.dto.Result;
import com.woniu.dto.StatusCode;
import com.woniu.service.UserfeedbackService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zyy
 * @since 2021-03-05
 * @since 2021-03-11
 */
@RestController
@RequestMapping("/userfeedback")
public class UserfeedbackController {




    @Resource
    private UserfeedbackService userfeedbackService;

    @PostMapping("adduserfeedback")
    public Result<Userfeedback> adduserfeedback(@RequestBody Userfeedback userfeedback){
        System.out.println(userfeedback);
        userfeedbackService.save(userfeedback);
        return new Result<>(true, StatusCode.OK,"发送成功");
    }
}

